package com.arsn.myf.business.service.impl;

import com.arsn.myf.business.entity.Notice;
import com.arsn.myf.business.mapper.NoticeMapper;
import com.arsn.myf.business.service.NoticeService;
import com.arsn.myf.business.vo.NoticeVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 公告实现层
 * @author zhongrj
 */
@Service
public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> implements NoticeService {

    /**
     * 自定义查询公告分页数据
     * @param page
     * @param notice
     * @return
     */
    @Override
    public IPage<NoticeVO> selectPageNoticeList(Page<NoticeVO> page, NoticeVO notice) {
        return page.setRecords(baseMapper.selectPageNoticeList(page,notice));
    }
}
